/*
 * AlarmManager.h
 *
 *  Created on: Mar 5, 2012
 *      Author: mikaelgra
 */

#include "Alarm.h"

#ifndef ALARMMANAGER_H_
#define ALARMMANAGER_H_

/**
 * Initializes the AlarmManager. This must be called
 * before any other methods.
 */
void AlarmManager_Initialize(void);

/**
 * Finalizes the AlarmManager. This must be the last
 * method called on the AlarmManager.
 */
void AlarmManager_Finalize(void);

/**
 * Adds an Alarm to the AlarmManager.
 *
 * @param alarm
 * 		This is the Alarm to be added
 */
void AlarmManager_AddAlarm(struct stAlarm_t* alarm);

/**
 * Removes an Alarm from the AlarmManager.
 *
 * @param alarm
 * 		This is the Alarm to be removed
 */
void AlarmManager_RemoveAlarm(struct stAlarm_t* alarm);

/**
 * Gets the number of alarms associated with the
 * AlarmManager
 *
 * @return
 * 		The number of alarms
 */
int AlarmManager_GetAlarmCount();

/**
 * Gets the Alarm at the specified index.
 *
 * @param index
 * 		Is the index of the alarm to be retrieved
 *
 * @return
 * 		Is the alarm at the index to be retrieved
 */
struct stAlarm_t* AlarmManager_GetAlarmAt(int index);

/**
 * Gets the Alarm at the specified index.
 *
 * @return
 * 		Is an alarm that was triggered
 */
struct stAlarm_t* AlarmManager_CheckAlarms();

#endif /* ALARMMANAGER_H_ */
